import React, { useEffect } from 'react'
import { test400, test404 } from '@/api/testErrorCode'
import { Button } from 'antd'

function axios() {

  const testCode400 = () => {
    test400({}).then(res => {
      console.log(res)
    }).catch(err => {
      console.error(err)
    })
  }
  const testCode404 = () => {
    test404({}).then(res => {
      console.log(res)
    }).catch(err => {
      console.error(err)
    })
  }
  const testCode500 = () => {
    test404({}).then(res => {
      console.log(res)
    }).catch(err => {
      console.error(err)
    })
  }

  return (
    <div>
      <Button type="primary" onClick={testCode400}>400</Button>
      <Button type="primary" onClick={testCode404}>404</Button>
    </div>
  )
}

export default axios